var mychart = echarts.init(document.getElementById("b1"));

var option ={
    grid: {},
    xAxis: {
        type: 'category',
    },
    title: {
        text: 'XX销量--沈林涛',
        left: 'center',
    },
    yAxis: {},
    series:[{
        type:'line',
        data:[4,6,2,5],
    }],

};
mychart.setOption(option)

var mychart2 = echarts.init(document.getElementById("b2"));

var option2 ={
    grid: [{
        top: '5%', bottom: '55%',
        left: '15%', right: '15%',
    },
    {
        left:'15%', right: '15%',
        bottom: '5%', top:'55%',
    },
    ],
    title: {
        text: 'XX销量--沈林涛',
        left: 'center',
    },
    xAxis: [{
        gridIndex: 0,
    },{
        gridIndex: 1,
    }],
    yAxis: [{
        gridIndex: 0,
    },{
        gridIndex: 1,
    }],

};
mychart2.setOption(option2)

var mychart3 = echarts.init(document.getElementById("b3"));

var option3 ={
    grid: [{
        top: '5%', bottom: '55%',
        left: '55%', right: '5%',
    },
    {
        top: '55%', bottom: '5%',
        left: '55%', right: '5%',
    },
    {
        top: '55%', bottom: '5%',
        left: '5%', right: '55%',
    },
    {
        top: '5%', bottom: '55%',
        left: '5%', right: '55%',
    },
    ],
    title: {
        text: 'XX销量--沈林涛',
        left: 'center',
    },
    xAxis: [{
        gridIndex: 0,
    },{
        gridIndex: 1,
    },{
        gridIndex: 2,type:'category',
    },{
        gridIndex: 3,name: 'xxx',
    }],
    yAxis: [{
        gridIndex: 0,
    },{
        gridIndex: 1,
    },{
        gridIndex: 2,
    },{
        gridIndex: 3,
    }],
    series:[{
        type:'line',
        data:[4,6,2,5],
        xAxisIndex: 2,
        yAxisIndex: 2,
    }],
};
mychart3.setOption(option3)

var mychart4 = echarts.init(document.getElementById("b4"));

var option4 ={
    grid: {},
    xAxis: {
        type: 'category',
        data: ['1季度','2季度','3季度','4季度'],
        // position: 'top',
        axisLabel: {
            color: 'red',
            fontFamily: 'monospace',
            // backgroundColor: 'gray',
            formatter: function(value){
                return value.split("").join("\n")
            },
        },
        axisLine: {
            // show: false,
            lineStyle: {
                color: 'green',
                shadowBlur: 10,
                opacity: 1,
                width: 2,
                shadowColor: 'red',
            },
        },
        axisTick: {
            show: true,
            length: 10,
            inside: true,
        },
        axisPointer:{
            show:true,
            label:{
                color: 'red',
                backgroundColor: 'white',
            },
        },
        name: '时间',
        nameLocation: 'middle',
        nameGap: 30,
        nameRotate: 90,
        nameTextStyle: {
            fontFamily: 'monospace',
            fontSize: 15,
            fontStyle: 'italic',
            fontWeight: 'bold',
            color: 'blue',
        },
        splitArea: {
            show: true,
            areaStyle: {
                color: ['red','white','black','gray'],
                opacity: 0.5,
            },
        },
        splitLine: {
            show: true,
            lineStyle: {
                width: 5,
                color: ['blue','green'],
            },
        },
    },
    title: {
        text: 'XX销量--沈林涛',
        left: 'center',
    },
    yAxis: {
        min:2,
        max:10,
        name:'销量',
        splitLine: {
            show:false,
        },
    },
    series:[{
        type:'line',
        data:[4,6,9,5],
    }],

};
mychart4.setOption(option4)

var myChart5=echarts.init(document.getElementById("b5"));
//配置绘图参数
var option5={
    xAxis: {
        type: 'category',
        data: ['1季度','2季度','3季度','4季度'],
        // position: 'top',
        axisLabel: {
            color: 'red',
            fontFamily: 'monospace',
            // backgroundColor: 'gray',
            formatter: function(value){
                return value.split("").join("\n")
            },
        },
        axisLine: {
            // show: false,
            lineStyle: {
                color: 'green',
                width: 5,
                opacity: 0.51,
                shadowBlur: 10,
                shadowColor: 'red',
            },
        },
        axisTick: {
            length: 10,
            inside: true,
            lineStyle: {
                color:'blue',
                width:10,
            },
        },
        
        name: '时间',
        nameLocation: 'end',
        nameGap: 15,
        nameRotate: 0,
        nameTextStyle: {
            color: 'blue',
        },
    },
    title: {
        text: 'XX销量--沈林涛',
        left: 'center',
    },
    yAxis: {
        min:2,
        max:10,
        type: 'value',
        name:'销量',
        nameLocation: 'start',
        nameGap: 20,
        nameRotate: 0,
        nameTextStyle: {
            color: 'blue',
        },
        splitLine: {
            show: false,
        },
        splitArea: {
            show:true,
            areaStyle: {
                color: ['red','white','black','blue'],
                opacity: 0.51,
            },
        },
        axisPointer: {
            show: true,
            label: {
                color: 'red',
                backgroundColor: 'white',
            },
        },
        splitLine: {
            show: true,
            lineStyle: {
                width: 5,
                color: ['blue','green'],
            },
        },
    },
    series: [{
        type:'line',
        data:[4,6,3,5],
    }],
   
    
};
//画图
myChart5.setOption(option5);

var myChart6 = echarts.init(document.getElementById("b6"))
var option6 = {
    xAxis: {
        name: '日期',
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
    },
    yAxis: {
        name: '销售量',
        type: 'value',
        // data: [10,20,30,40],
    },
    title: {
        text: 'XX销量--沈林涛',
        left: 'center',
    },
    legend: {
        top: 'bottom',
    },
    tooltip: {
        trigger: 'axis',
    },
    series:[{
        type:'scatter',
        name: '馒头',
        data:[10,13,15,14,17],
    },{
        type:'line',
        name: '包子',
        smooth: true,
        data:[7,4,5,9,8],
        symbolSize: 20,
    },{
        type:'line',
        name: '烧饼',
        data:[4,2,3,8,5],
        symbol: 'triangle',
        symbolSize: 20,
    }],
};
myChart6.setOption(option6)